from django import forms
from django.forms import CharField


class UserLRForm(forms.Form):
    username=forms.CharField(
        label='用户名',
        max_length=20,
        min_length=2,
        error_messages={
            'max_length':'用户名字数大于20',
            'min_length':'用户名字数小于2'

        }
    )

    password=forms.CharField(
        label='密码',
        max_length=20,
        min_length=6,
        error_messages={
            'max_length': '密码字数大于20',
            'min_length': '密码字数小于6'
        },
        widget=forms.PasswordInput
    )


